package com.htlwk.javapractice;

import java.util.function.Consumer;

/**
 * @ClassName ConsumerDemo02
 * @Description TODO
 * @Author liaowenxiong
 * @Date 2024/12/23 22:01
 * @Version 1.0
 */
public class ConsumerDemo02 {
    public static void main(String[] args) {
        String str = "刘德华";
        Consumer<String> con1 = System.out::println;
        Consumer<String> con2 = t -> System.out.println(t.length());
        con1.andThen(con2).accept(str);
    }
}
